﻿namespace Pap.Web.Modules.Loan.Views
{
    using System;
    using System.Web.UI;
    using Coolite.Ext.Web;
    using global::Utils.UIPermission;
    using Pap.Web.Modules.Loan.ViewModel;
    using Pap.Web.Utils;

    /// <summary>
    /// 
    /// </summary>
    public partial class ResponsibleWaitingList : BasePage<ResponsibleWaitingListViewModel>, IPermittedPage
    {
        #region Event Handlers
        /// <summary>
        /// Handles the Load event of the Page control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        protected void Page_Load(object sender, EventArgs e)
        {
            //responsibleWaitingList1.LoansSubmitted += new EventHandler<AjaxEventArgs>(responsibleWaitingList1_LoansSubmitted);
            if (!Page.IsPostBack && !Ext.IsAjaxRequest)
            {
            }

        }

        /// <summary>
        /// Handles the LoansSubmitted event of the responsibleWaitingList1 control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="Coolite.Ext.Web.AjaxEventArgs"/> instance containing the event data.</param>
        void responsibleWaitingList1_LoansSubmitted(object sender, AjaxEventArgs e)
        {
            //responsibleWaitingList2.RefreshControl();
        }

        /// <summary>
        /// Handles the Clicked event of the btnBack control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="args">The <see cref="Coolite.Ext.Web.AjaxEventArgs"/> instance containing the event data.</param>
        protected void btnBack_Clicked(object sender, AjaxEventArgs args)
        {
            this.RedirectToPreviousPage();
        }

        #endregion

        #region IPermittedPage Members

        /// <summary>
        /// Gets the name of the permission.
        /// </summary>
        /// <value>
        /// The name of the permission.
        /// </value>
        public string PermissionName
        {
            get { return "ResponsibleWaitingList"; }
        }

        #endregion
    }
}
